<template>
	<view>
		<u--form labelPosition="top" labelWidth="200" :model="form" :rules="rules" ref="uForm">
			<view class="form-area">
				<view style="margin: 20rpx 0;" class="info-title">签约注册情况</view>
				<!-- 注意，如果需要兼容微信小程序，最好通过setRules方法设置rules规则 -->
				<u-form-item required label="入库状态:" prop="projectInfo.entryStatus">
					<u-radio-group style="margin-top: 30rpx;" v-model="form.projectInfo.entryStatus">
						<u-radio shape="circle" :name="1" label="签约注册库"></u-radio>
						<u-radio style="margin: 0 20rpx;" shape="circle" :name="2" label="在批库"></u-radio>
						<u-radio shape="circle" :name="3" label="在建库"></u-radio>
					</u-radio-group>
				</u-form-item>
				<u-form-item required label="项目编码:" prop="projectInfo.projectCode">
					<u--input placeholder="请输入项目编码" maxlength="30" v-model="form.projectInfo.projectCode"></u--input>
				</u-form-item>
				<u-form-item required label="项目名称:" prop="projectInfo.projectName">
					<u--input placeholder="请输入项目名称" maxlength="30" v-model="form.projectInfo.projectName"></u--input>
				</u-form-item>
				<u-form-item required label="签约时间:" prop="projectInfo.signingDate">
					<view style="width: 100%;" @click="openDate(0)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;" placeholder="请选择签约时间"
							v-model="form.projectInfo.signingDate" suffixIcon="calendar"
							suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item required label="投资方:" prop="projectInfo.investor">
					<u--input placeholder="请输入投资方" maxlength="50" v-model="form.projectInfo.investor"></u--input>
				</u-form-item>
				<u-form-item required label="投资方来源:" prop="projectInfo.investorSource">
					<u--input placeholder="请输入投资方来源" maxlength="30"
						v-model="form.projectInfo.investorSource"></u--input>
				</u-form-item>
				<u-form-item required label="行业类别:" prop="projectInfo.industryTypeOneName">
					<view style="width: 100%;" class="between_layout">
						<view @click="openArea(0)">
							<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
								placeholder="请选择一级行业" v-model="form.projectInfo.industryTypeOneName"
								suffixIcon="arrow-down" suffixIconStyle="color: #909399"></u--input>
						</view>
						<view @click="openArea(1)">
							<u--input disabled disabledColor="#ffffff" style="pointer-events: none;margin-left: 20rpx;"
								placeholder="请选择二级行业" v-model="form.projectInfo.industryTypeTwoName"
								suffixIcon="arrow-down" suffixIconStyle="color: #909399"></u--input>
						</view>
					</view>
					<u-picker v-if="areaPicker" :defaultIndex="defaultValue" @cancel="areaPicker=false"
						@confirm="confirmAreaPicker" :show="areaPicker" :columns="areaColumns"
						keyName="dictName"></u-picker>
				</u-form-item>
				<u-form-item required label="投资方式:" prop="projectInfo.investmentModeName">
					<view style="width: 100%;" @click="openPicker(0)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;" placeholder="请选择投资方式"
							v-model="form.projectInfo.investmentModeName" suffixIcon="arrow-down"
							suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item v-if="form.projectInfo.investmentMode==1||form.projectInfo.investmentMode==3" required
					label="内资计划总投资:" prop="projectInfo.domesticInvestment">
					<u--input type="digit" placeholder="请输入内资计划总投资" maxlength="10"
						v-model="form.projectInfo.domesticInvestment">
						<template slot="suffix">万元</template>
					</u--input>
				</u-form-item>
				<u-form-item v-if="form.projectInfo.investmentMode==2||form.projectInfo.investmentMode==3" required
					label="外资计划总投资:" prop="projectInfo.foreignInvestment">
					<view>
						<view style="width: 100%;">
							<u--input type="digit" placeholder="请输入外资计划总投资" maxlength="10"
								v-model="form.projectInfo.foreignInvestmentRmb">
								<template slot="suffix">万元</template>
							</u--input>
						</view>
						<view style="width: 100%;margin-top: 30rpx;" class="between_layout">
							<u--input type="digit" placeholder="请输入" maxlength="10"
								v-model="form.projectInfo.foreignInvestment">
							</u--input>
							<view style="width: 30%;margin-left: 20rpx;" @click="openPicker(1)">
								<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
									placeholder="请选择" v-model="form.projectInfo.foreignInvestmentTypeName"
									suffixIcon="arrow-down" suffixIconStyle="color: #909399"></u--input>
							</view>
						</view>
					</view>
				</u-form-item>
				<u-form-item required label="产业链:" prop="projectInfo.industrialChainName">
					<view style="width: 100%;" @click="openPicker(3)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;" placeholder="请选择产业链"
							v-model="form.projectInfo.industrialChainName" suffixIcon="arrow-down"
							suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item required label="计划用地面积:" prop="projectInfo.plannedLandArea">
					<u--input type="digit" placeholder="请输入计划用地面积" maxlength="10"
						v-model="form.projectInfo.plannedLandArea">
						<template slot="suffix">m²</template>
					</u--input>
				</u-form-item>
				<u-form-item required label="预计税收:" prop="projectInfo.estimatedTaxRevenue">
					<u--input type="digit" placeholder="请输入预计税收" maxlength="10"
						v-model="form.projectInfo.estimatedTaxRevenue">
						<template slot="suffix">万元</template>
					</u--input>
				</u-form-item>
				<u-form-item required label="预计产值:" prop="projectInfo.estimatedOutputValue">
					<u--input type="digit" placeholder="请输入预计产值" maxlength="10"
						v-model="form.projectInfo.estimatedOutputValue">
						<template slot="suffix">万元</template>
					</u--input>
				</u-form-item>
				<u-form-item required label="招商人员:" prop="projectInfo.investmentPromoter">
					<u--input placeholder="请输入招商人员" maxlength="50"
						v-model="form.projectInfo.investmentPromoter"></u--input>
				</u-form-item>
				<u-form-item required label="招商部门:" prop="projectInfo.investmentPromotionDepartment">
					<u--input placeholder="请输入招商部门" maxlength="50"
						v-model="form.projectInfo.investmentPromotionDepartment"></u--input>
				</u-form-item>
				<u-form-item required label="招商人员联系方式:" prop="projectInfo.investmentPromoterContact">
					<u--input placeholder="请输入招商人员联系方式" maxlength="11"
						v-model="form.projectInfo.investmentPromoterContact"></u--input>
				</u-form-item>
				<u-form-item required label="用地位置:" prop="projectInfo.landLocationFirst">
					<u--input type="digit" placeholder="请选择用地位置" v-model="form.projectInfo.landLocationFirst">
						<template slot="suffix">
							<u-button @tap="getMapLocation" text="选择" type="success" size="small"></u-button>
						</template>
					</u--input>
				</u-form-item>
				<u-form-item required label="项目简介:" prop="projectInfo.projectIntroduction">
					<u--textarea :height="150" v-model="form.projectInfo.projectIntroduction" maxlength="500" count
						placeholder="请输入项目简介"></u--textarea>
				</u-form-item>
				<u-form-item required label="行业地位及特色亮点:" prop="projectInfo.industryPositionHighlights">
					<u--textarea :height="150" v-model="form.projectInfo.industryPositionHighlights" maxlength="500"
						count placeholder="请输入行业地位及特色亮点"></u--textarea>
				</u-form-item>
			</view>
			<view class="form-area">
				<view style="margin: 20rpx 0;" class="info-title">项目业主信息</view>
				<u-form-item required label="项目业主:" prop="projectInfo.projectOwner">
					<u--input :disabled="roles.includes('company')" placeholder="请输入项目业主" maxlength="30"
						v-model="form.projectInfo.projectOwner"></u--input>
				</u-form-item>
				<u-form-item required label="社会信用代码:" prop="projectInfo.socialCreditCode">
					<u--input :disabled="roles.includes('company')" placeholder="请输入社会信用代码" maxlength="18"
						v-model="form.projectInfo.socialCreditCode"></u--input>
				</u-form-item>
				<u-form-item required label="负责人姓名:" prop="projectInfo.leaderName">
					<u--input placeholder="请输入负责人姓名" maxlength="30" v-model="form.projectInfo.leaderName"></u--input>
				</u-form-item>
				<u-form-item required label="负责人电话:" prop="projectInfo.leaderTelephone">
					<u--input placeholder="请输入负责人电话" maxlength="11"
						v-model="form.projectInfo.leaderTelephone"></u--input>
				</u-form-item>
				<u-form-item required label="联系人姓名:" prop="projectInfo.contactPersonName">
					<u--input placeholder="请输入联系人姓名" maxlength="30"
						v-model="form.projectInfo.contactPersonName"></u--input>
				</u-form-item>
				<u-form-item required label="联系人电话:" prop="projectInfo.contactPersonTelephone">
					<u--input placeholder="请输入联系人电话" maxlength="11"
						v-model="form.projectInfo.contactPersonTelephone"></u--input>
				</u-form-item>
			</view>
			<view v-if="form.projectInfo.entryStatus==2||form.projectInfo.entryStatus==3" class="form-area">
				<view style="margin: 20rpx 0;" class="info-title">项目在批情况</view>
				<u-form-item label="项目代码:" prop="projectApprove.projectDm">
					<u--input placeholder="请输入项目代码" maxlength="30" v-model="form.projectApprove.projectDm"></u--input>
				</u-form-item>
				<u-form-item label="备案投资额:" prop="projectApprove.recordedInvestmentAmount">
					<u--input type="digit" placeholder="请输入备案投资额" maxlength="10"
						v-model="form.projectApprove.recordedInvestmentAmount">
						<template slot="suffix">万元</template>
					</u--input>
				</u-form-item>
				<u-form-item label="当年计划投资:" prop="projectApprove.currentYearPlannedInvestment">
					<u--input type="digit" placeholder="请输入当年计划投资" maxlength="10"
						v-model="form.projectApprove.currentYearPlannedInvestment">
						<template slot="suffix">万元</template>
					</u--input>
				</u-form-item>
				<u-form-item required label="计划开工日期:" prop="projectApprove.plannedStartDate">
					<view style="width: 100%;" @click="openDate(1)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;" placeholder="请选择计划开工日期"
							v-model="form.projectApprove.plannedStartDate" suffixIcon="calendar"
							suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item label="供地时间:" prop="projectApprove.landSupplyDate">
					<view style="width: 100%;" @click="openDate(2)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
							placeholder="请选择供地时间(拿地后填)" v-model="form.projectApprove.landSupplyDate"
							suffixIcon="calendar" suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item label="供地面积:" prop="projectApprove.landSupplyArea">
					<u--input type="digit" placeholder="请输入供地面积(拿地后填)" maxlength="10"
						v-model="form.projectApprove.landSupplyArea">
						<template slot="suffix">m²</template>
					</u--input>
				</u-form-item>
				<u-form-item label="所属街道:" prop="projectInfo.street">
					<u--input placeholder="请输入所属街道(拿地后填)" maxlength="50"
						v-model="form.projectApprove.street"></u--input>
				</u-form-item>
				<u-form-item label="用地位置:" prop="projectInfo.landLocationSecond">
					<u--input placeholder="请输入用地位置(拿地后填)" maxlength="100"
						v-model="form.projectApprove.landLocationSecond"></u--input>
				</u-form-item>
				<u-form-item label="土地合同约定开工时间:" prop="projectApprove.agreedStart">
					<view style="width: 100%;" @click="openDate(3)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;" placeholder="拿地后填"
							v-model="form.projectApprove.agreedStart" suffixIcon="calendar"
							suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item label="土地合同约定竣工时间:" prop="projectApprove.agreedCompletion">
					<view style="width: 100%;" @click="openDate(4)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;" placeholder="拿地后填"
							v-model="form.projectApprove.agreedCompletion" suffixIcon="calendar"
							suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item label="监管协议约定达产时间:" prop="projectApprove.agreedProduction">
					<view style="width: 100%;" @click="openDate(5)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
							placeholder="请选择监管协议约定达产时间" v-model="form.projectApprove.agreedProduction"
							suffixIcon="calendar" suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item label="列省市重大项目时间:" prop="projectApprove.majorProjectDate">
					<view style="width: 100%;" @click="openDate(6)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
							placeholder="请选择列省市重大项目时间" v-model="form.projectApprove.majorProjectDate"
							suffixIcon="calendar" suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item required label="省市重大项目:" prop="projectApprove.projectProvince">
					<u-radio-group style="margin-top: 30rpx;" v-model="form.projectApprove.projectProvince">
						<u-radio shape="circle" :name="1" label="省重大"></u-radio>
						<u-radio style="margin: 0 20rpx;" shape="circle" :name="2" label="市重大"></u-radio>
						<u-radio shape="circle" :name="3" label="否"></u-radio>
					</u-radio-group>
				</u-form-item>
				<u-form-item label="总平图:" prop="projectApprove.generalPlanDiagram">
					<u-radio-group style="margin-top: 30rpx;" v-model="form.projectApprove.generalPlanDiagram">
						<u-radio shape="circle" :name="1" label="未办理"></u-radio>
						<u-radio style="margin: 0 20rpx;" shape="circle" :name="2" label="正在办理"></u-radio>
						<u-radio shape="circle" :name="3" label="已批"></u-radio>
					</u-radio-group>
				</u-form-item>
				<u-form-item label="规划建筑面积:" prop="projectApprove.plannedConstructionArea">
					<u--input type="digit" placeholder="请输入规划建筑面积" maxlength="10"
						v-model="form.projectApprove.plannedConstructionArea">
						<template slot="suffix">m²</template>
					</u--input>
				</u-form-item>
				<u-form-item label="第一张施工许可证日期:" prop="projectApprove.firstPermitDate">
					<view style="width: 100%;" @click="openDate(7)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
							placeholder="请选择第一张施工许可证日期" v-model="form.projectApprove.firstPermitDate"
							suffixIcon="calendar" suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item label="承诺制开工日期:" prop="projectApprove.promisedStartDate">
					<view style="width: 100%;" @click="openDate(8)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
							placeholder="请选择承诺制开工日期" v-model="form.projectApprove.promisedStartDate"
							suffixIcon="calendar" suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item label="开工面积:" prop="projectApprove.commencedArea">
					<u--input type="digit" placeholder="施工许可证载面积累加" maxlength="10"
						v-model="form.projectApprove.commencedArea">
						<template slot="suffix">m²</template>
					</u--input>
				</u-form-item>
				<u-form-item required label="实际开工日期:" prop="projectApprove.actualStartDate">
					<view style="width: 100%;" @click="openDate(9)">
						<u--input disabled disabledColor="#ffffff" style="pointer-events: none;"
							placeholder="以承诺制开工日期或第一张施工许可发放日期最先为准，技改项目手工输入"
							v-model="form.projectApprove.actualStartDate" suffixIcon="calendar"
							suffixIconStyle="color: #909399"></u--input>
					</view>
				</u-form-item>
				<u-form-item required label="项目前期工作开展情况:" prop="projectApprove.preWork">
					<u--textarea :height="150" v-model="form.projectApprove.preWork" maxlength="500" count
						placeholder="请输入项目前期工作开展情况"></u--textarea>
				</u-form-item>
				<view style="font-weight: bold;">五评</view>
				<u-form-item required label="职评批示状态:" prop="projectApprove.evaluationApprovalStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.evaluationApprovalStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<u-form-item v-if="form.projectApprove.evaluationApprovalStatus==0" label="职评附件:">
					<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
						v-model="form.projectApprove.evaluationApprovalArr"
						@select="selectFile($event,'evaluationApproval')"
						@delete="deleteFile($event,'evaluationApproval')" limit="3" file-mediatype="all">
					</filePicker>
				</u-form-item>
				<u-form-item required label="稳评批示状态:" prop="projectApprove.stabilityEvaluationApprovalStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.stabilityEvaluationApprovalStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<u-form-item v-if="form.projectApprove.stabilityEvaluationApprovalStatus==0" label="稳评附件:">
					<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
						v-model="form.projectApprove.stabilityEvaluationApprovalArr"
						@select="selectFile($event,'stabilityEvaluationApproval')"
						@delete="deleteFile($event,'stabilityEvaluationApproval')" limit="3" file-mediatype="all">
					</filePicker>
				</u-form-item>
				<u-form-item required label="环评批示状态:" prop="projectApprove.assessmentApprovalStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.assessmentApprovalStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view
					v-if="form.projectApprove.assessmentApprovalStatus==0||form.projectApprove.assessmentApprovalStatus==2">
					<u-form-item label="环评批示类型:">
						<uni-data-select :clear="false" v-model="form.projectApprove.assessmentApprovalType"
							:localdata="hppslxList"></uni-data-select>
					</u-form-item>
					<u-form-item label="环评附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.assessmentApprovalArr"
							@select="selectFile($event,'assessmentApproval')"
							@delete="deleteFile($event,'assessmentApproval')" limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<u-form-item required label="安评批示状态:" prop="projectApprove.safetyApprovalStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.safetyApprovalStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.safetyApprovalStatus==0||form.projectApprove.safetyApprovalStatus==2">
					<u-form-item label="安评批示类型:">
						<uni-data-select :clear="false" v-model="form.projectApprove.safetyApprovalType"
							:localdata="appslxList"></uni-data-select>
					</u-form-item>
					<u-form-item label="安评附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.safetyApprovalArr"
							@select="selectFile($event,'safetyApproval')" @delete="deleteFile($event,'safetyApproval')"
							limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<u-form-item required label="能评批示状态:" prop="projectApprove.energyApprovalStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.energyApprovalStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.energyApprovalStatus==0||form.projectApprove.energyApprovalStatus==2">
					<u-form-item label="能评批示类型:">
						<uni-data-select :clear="false" v-model="form.projectApprove.energyApprovalType"
							:localdata="nppslxList"></uni-data-select>
					</u-form-item>
					<u-form-item label="能评附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.energyApprovalArr"
							@select="selectFile($event,'energyApproval')" @delete="deleteFile($event,'energyApproval')"
							limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<view style="font-weight: bold;">六证</view>
				<u-form-item required label="备案证状态:" prop="projectApprove.recordCertificateStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.recordCertificateStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.recordCertificateStatus==0">
					<u-form-item label="备案证号:">
						<uni-easyinput :clearSize="16" :maxlength="50" type="text" :inputBorder="true"
							v-model="form.projectApprove.recordCertificateCode" placeholder="请输入备案证号"></uni-easyinput>
					</u-form-item>
					<u-form-item label="备案证附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.recordCertificateArr"
							@select="selectFile($event,'recordCertificate')"
							@delete="deleteFile($event,'recordCertificate')" limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<u-form-item required label="不动产权证状态:" prop="projectApprove.ownershipCertificateStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.ownershipCertificateStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.ownershipCertificateStatus==0">
					<u-form-item label="不动产权证号:">
						<uni-easyinput :clearSize="16" :maxlength="50" type="text" :inputBorder="true"
							v-model="form.projectApprove.ownershipCertificateCode"
							placeholder="请输入不动产权证号"></uni-easyinput>
					</u-form-item>
					<u-form-item label="不动产权证附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.ownershipCertificateArr"
							@select="selectFile($event,'ownershipCertificate')"
							@delete="deleteFile($event,'ownershipCertificate')" limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<u-form-item required label="用地规划许可证状态:" prop="projectApprove.landPlanningPermitStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.landPlanningPermitStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.landPlanningPermitStatus==0">
					<u-form-item label="用地规划许可证号:">
						<uni-easyinput :clearSize="16" :maxlength="50" type="text" :inputBorder="true"
							v-model="form.projectApprove.landPlanningPermitCode"
							placeholder="请输入用地规划许可证号"></uni-easyinput>
					</u-form-item>
					<u-form-item label="用地规划许可证附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.landPlanningPermitArr"
							@select="selectFile($event,'landPlanningPermit')"
							@delete="deleteFile($event,'landPlanningPermit')" limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<u-form-item required label="工程规划许可证状态:" prop="projectApprove.engineeringPlanningPermitStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.engineeringPlanningPermitStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.engineeringPlanningPermitStatus==0">
					<u-form-item label="工程规划许可证号:">
						<uni-easyinput :clearSize="16" :maxlength="50" type="text" :inputBorder="true"
							v-model="form.projectApprove.engineeringPlanningPermitCode"
							placeholder="请输入工程规划许可证号"></uni-easyinput>
					</u-form-item>
					<u-form-item label="工程规划许可证附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.engineeringPlanningPermitArr"
							@select="selectFile($event,'engineeringPlanningPermit')"
							@delete="deleteFile($event,'engineeringPlanningPermit')" limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<u-form-item required label="审图合格证状态:" prop="projectApprove.drawingReviewCertificateStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.drawingReviewCertificateStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.drawingReviewCertificateStatus==0">
					<u-form-item label="审图合格证号:">
						<uni-easyinput :clearSize="16" :maxlength="50" type="text" :inputBorder="true"
							v-model="form.projectApprove.drawingReviewCertificateCode"
							placeholder="请输入审图合格证号"></uni-easyinput>
					</u-form-item>
					<u-form-item label="审图合格证附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.drawingReviewCertificateArr"
							@select="selectFile($event,'drawingReviewCertificate')"
							@delete="deleteFile($event,'drawingReviewCertificate')" limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
				<u-form-item required label="施工许可证状态:" prop="projectApprove.constructionPermitStatus">
					<uni-data-select :clear="false" v-model="form.projectApprove.constructionPermitStatus"
						:localdata="statusList"></uni-data-select>
				</u-form-item>
				<view v-if="form.projectApprove.constructionPermitStatus==0">
					<u-form-item label="施工许可证号:">
						<uni-easyinput :clearSize="16" :maxlength="50" type="text" :inputBorder="true"
							v-model="form.projectApprove.constructionPermitCode"
							placeholder="请输入施工许可证号"></uni-easyinput>
					</u-form-item>
					<u-form-item label="施工许可证附件:">
						<filePicker :fileExtname='["pdf", "png", "jpg", "zip", "rar", "doc", "docx", "xls", "xlsx"]'
							v-model="form.projectApprove.constructionPermitArr"
							@select="selectFile($event,'constructionPermit')"
							@delete="deleteFile($event,'constructionPermit')" limit="3" file-mediatype="all">
						</filePicker>
					</u-form-item>
				</view>
			</view>
			<view v-if="form.projectInfo.entryStatus==3" class="form-area">
				<view style="margin: 20rpx 0;" class="info-title">项目在建情况</view>
				<u-form-item required label="列统情况:" prop="projectBuild.listedStatistics">
					<u-radio-group style="margin-top: 30rpx;" v-model="form.projectBuild.listedStatistics">
						<u-radio shape="circle" :name="1" label="在库"></u-radio>
						<u-radio style="margin: 0 20rpx;" shape="circle" :name="2" label="未入库"></u-radio>
						<u-radio shape="circle" :name="3" label="退库"></u-radio>
					</u-radio-group>
				</u-form-item>
				<u-form-item required label="累计完成投资:" prop="projectBuild.accumulatedCompleted">
					<u--input type="digit" placeholder="请输入累计完成投资" maxlength="10"
						v-model="form.projectBuild.accumulatedCompleted">
						<template slot="suffix">万元</template>
					</u--input>
				</u-form-item>
				<u-form-item required label="当年完成投资:" prop="projectBuild.currentYearCompleted">
					<u--input type="digit" placeholder="请输入当年完成投资" maxlength="10"
						v-model="form.projectBuild.currentYearCompleted">
						<template slot="suffix">万元</template>
					</u--input>
				</u-form-item>
			</view>
		</u--form>
		<pickDate ref="myPicker" @submit="handleSubmit" :start-year="1930" :end-year="2099"
			:time-hide="[true, true, true, false, false, false]" :time-label="['年', '月', '日']">
		</pickDate>
		<u-picker v-if="showPicker" :defaultIndex="defaultIndex" @cancel="showPicker=false" @confirm="confirmPicker"
			:show="showPicker" :columns="columns" keyName="dictLabel"></u-picker>
		<view style="padding: 40rpx 24rpx;">
			<u-button shape='circle' class="sub-btn" type="primary" @click="submit">提交</u-button>
		</view>
		<u-loading-page :loading="loading" bg-color="rgba(0, 0, 0, 0.3)"></u-loading-page>
	</view>
</template>

<script>
	import {
		listMultiDict,
		getDicts,
		updateProjectInfo,
		addProjectInfo,
		getProjectInfo,
		getCompanyDetail,
		addProjectStages
	} from '@/utils/api.js'
	import pickDate from '@/components/yt-dateTimePicker/yt-dateTimePicker.vue'
	import filePicker from '@/components/uni-file-picker/uni-file-picker.vue'
	export default {
		components: {
			filePicker,
			pickDate
		},
		data() {
			return {
				loading: false,
				dateType: "",
				roles: [],
				dateList: [{
					name: '签约时间',
					label: 'signingDate'
				}, {
					name: '计划开工日期',
					label: 'plannedStartDate'
				}, {
					name: '供地时间',
					label: 'landSupplyDate'
				}, {
					name: '土地合同约定开工时间',
					label: 'agreedStart'
				}, {
					name: '土地合同约定竣工时间',
					label: 'agreedCompletion'
				}, {
					name: '监管协议约定达产时间',
					label: 'agreedProduction'
				}, {
					name: '列省市重大项目时间',
					label: 'majorProjectDate'
				}, {
					name: '第一张施工许可证日期',
					label: 'firstPermitDate'
				}, {
					name: '承诺制开工日期',
					label: 'promisedStartDate'
				}, {
					name: '实际开工日期',
					label: 'actualStartDate'
				}],
				areaPicker: false,
				areaColumns: [],
				defaultValue: [0],
				areaType: '',
				siftList: [{
					name: 'industryTypeOne',
					list: []
				}, {
					name: 'industryTypeTwo',
					list: []
				}],
				defaultIndex: [0],
				showPicker: false,
				columns: [],
				pickerType: "",
				dictList: [{
					name: '投资方式',
					label: 'investmentMode',
					list: []
				}, {
					name: '外资币种',
					label: 'foreignInvestmentType',
					list: []
				}, {
					name: '产业类别',
					label: 'industryCategory',
					list: []
				}, {
					name: '产业链',
					label: 'industrialChain',
					list: []
				}],
				form: {
					projectInfo: {
						parentId: undefined,
						entryStatus: 1,
						projectCode: undefined,
						projectName: undefined,
						investorSource: undefined,
						domesticInvestment: undefined,
						foreignInvestment: undefined,
						foreignInvestmentRmb: undefined,
						foreignInvestmentType: '1',
						foreignInvestmentTypeName: '美元',
						industrialChain: undefined,
						industrialChainName: undefined,
						plannedLandArea: undefined,
						estimatedTaxRevenue: undefined,
						investmentPromoter: undefined,
						signingDate: undefined,
						investor: undefined,
						investmentMode: undefined,
						investmentModeName: undefined,
						industryTypeOne: undefined,
						industryTypeOneName: undefined,
						industryTypeTwo: undefined,
						industryTypeTwoName: undefined,
						landLocationFirst: undefined,
						estimatedOutputValue: undefined,
						investmentPromotionDepartment: undefined,
						investmentPromoterContact: undefined,
						longitude: undefined,
						latitude: undefined,
						projectIntroduction: undefined,
						industryPositionHighlights: undefined,
						projectOwner: undefined,
						socialCreditCode: undefined,
						leaderName: undefined,
						leaderTelephone: undefined,
						contactPersonName: undefined,
						contactPersonTelephone: undefined,
					},
					"projectApprove": {
						"projectDm": undefined,
						"recordedInvestmentAmount": undefined,
						"currentYearPlannedInvestment": undefined,
						"plannedStartDate": undefined,
						"landSupplyDate": undefined,
						"landSupplyArea": undefined,
						"street": undefined,
						"landLocationSecond": undefined,
						"agreedStart": undefined,
						"agreedCompletion": undefined,
						"agreedProduction": undefined,
						"majorProjectDate": undefined,
						"generalPlanDiagram": undefined,
						"projectProvince": undefined,
						"plannedConstructionArea": undefined,
						"firstPermitDate": undefined,
						"promisedStartDate": undefined,
						"actualStartDate": undefined,
						"commencedArea": undefined,
						"recordCertificate": undefined,
						"recordCertificateArr": [],
						"recordCertificateStatus": 1,
						"recordCertificateCode": undefined,
						"ownershipCertificateStatus": 1,
						"ownershipCertificateCode": undefined,
						"ownershipCertificate": undefined,
						"ownershipCertificateArr": [],
						"landPlanningPermitStatus": 1,
						"landPlanningPermitCode": undefined,
						"landPlanningPermit": undefined,
						"landPlanningPermitArr": [],
						"engineeringPlanningPermit": undefined,
						"engineeringPlanningArr": [],
						"engineeringPlanningPermitStatus": 1,
						"engineeringPlanningPermitCode": undefined,
						"drawingReviewCertificate": undefined,
						"drawingReviewCertificateArr": [],
						"drawingReviewCertificateStatus": 1,
						"drawingReviewCertificateCode": undefined,
						"constructionPermit": undefined,
						"constructionPermitArr": [],
						"constructionPermitStatus": 1,
						"constructionPermitCode": undefined,
						"evaluationApproval": undefined,
						"evaluationApprovalArr": [],
						"evaluationApprovalStatus": 1,
						"stabilityEvaluationApproval": undefined,
						"stabilityEvaluationApprovalArr": [],
						"stabilityEvaluationApprovalStatus": 1,
						"assessmentApprovalType": undefined,
						"assessmentApproval": undefined,
						"assessmentApprovalArr": [],
						"assessmentApprovalStatus": 1,
						"safetyApprovalType": undefined,
						"safetyApproval": undefined,
						"safetyApprovalArr": [],
						"safetyApprovalStatus": 1,
						"energyApprovalType": undefined,
						"energyApproval": undefined,
						"energyApprovalArr": [],
						"energyApprovalStatus": 1,
					},
					"projectBuild": {
						"listedStatistics": undefined,
						"accumulatedCompleted": undefined,
						"currentYearCompleted": undefined,
					},
					projectCompletion: {},
					projectProduction: {},
					projectEfficiency: {}
				},
				rules: {
					'projectInfo.entryStatus': [{
						type: 'number',
						required: true,
						message: "入库状态不能为空",
						trigger: "change"
					}],
					'projectInfo.projectCode': [{
						required: true,
						message: "项目编码不能为空",
						trigger: "blur"
					}],
					'projectInfo.projectName': [{
						required: true,
						message: "项目名称不能为空",
						trigger: "blur"
					}],
					'projectInfo.investorSource': [{
						required: true,
						message: "投资方来源不能为空",
						trigger: "blur"
					}],
					'projectInfo.foreignInvestmentType': [{
						required: true,
						message: "外资计划类型不能为空",
						trigger: "change"
					}],
					'projectInfo.industrialChainName': [{
						required: true,
						message: "产业链不能为空",
						trigger: "change"
					}],
					'projectInfo.plannedLandArea': [{
						required: true,
						message: "计划用地面积不能为空",
						trigger: "change"
					}],
					'projectInfo.estimatedTaxRevenue': [{
						required: true,
						message: "预计税收不能为空",
						trigger: "blur"
					}],
					'projectInfo.investmentPromoter': [{
						required: true,
						message: "招商人员不能为空",
						trigger: "blur"
					}],
					'projectInfo.signingDate': [{
						required: true,
						message: "签约时间不能为空",
						trigger: "change"
					}],
					'projectInfo.investor': [{
						required: true,
						message: "投资方不能为空",
						trigger: "blur"
					}],
					'projectInfo.investmentModeName': [{
						required: true,
						message: "投资方式不能为空",
						trigger: "change"
					}],
					'projectInfo.domesticInvestment': [{
						required: true,
						message: "内资计划总投资不能为空",
						trigger: "blur"
					}],
					'projectInfo.foreignInvestment': [{
						required: true,
						message: "外资计划总投资不能为空",
						trigger: "blur"
					}],
					'projectInfo.industryTypeOneName': [{
						required: true,
						message: "行业类别不能为空",
						trigger: "change"
					}],
					'projectInfo.landLocationFirst': [{
						required: true,
						message: "用地位置不能为空",
						trigger: "blur"
					}],
					'projectInfo.estimatedOutputValue': [{
						required: true,
						message: "预计产值不能为空",
						trigger: "blur"
					}],
					'projectInfo.investmentPromotionDepartment': [{
						required: true,
						message: "招商部门不能为空",
						trigger: "blur"
					}],
					'projectInfo.investmentPromoterContact': [{
							required: true,
							message: "招商人员联系方式不能为空",
							trigger: "blur"
						},
						{
							required: true,
							validator: (rule, value, callback) => {
								if (value === '') {
									callback(new Error('请输入'));
								} else {
									let regPone = null;
									let mobile = /^1(3|4|5|6|7|8|9)\d{9}$/; //最新16手机正则
									let tel = /^(0[0-9]{2,3}\-)([2-9][0-9]{4,7})+(\-[0-9]{1,4})?$/; //座机
									if (value.charAt(0) == 0) { // charAt查找第一个字符方法，用来判断输入的是座机还是手机号
										regPone = tel;
									} else {
										regPone = mobile;
									}
									if (!regPone.test(value)) {
										return callback(
											new Error("请输入正确的电话号码")
										);
									}
									callback();
								}
							},
							trigger: "blur"
						}
					],
					'projectInfo.longitude': [{
						required: true,
						message: "经度不能为空",
						trigger: "blur"
					}],
					'projectInfo.latitude': [{
						required: true,
						message: "纬度不能为空",
						trigger: "blur"
					}],
					'projectInfo.projectIntroduction': [{
						required: true,
						message: "项目简介不能为空",
						trigger: "blur"
					}],
					'projectInfo.industryPositionHighlights': [{
						required: true,
						message: "行业地位及特色亮点不能为空",
						trigger: "blur"
					}],
					'projectInfo.projectOwner': [{
						required: true,
						message: "项目业主不能为空",
						trigger: "blur"
					}],
					'projectInfo.socialCreditCode': [{
						required: true,
						message: "社会信用代码不能为空",
						trigger: "blur"
					}],
					'projectInfo.leaderName': [{
						required: true,
						message: "负责人姓名不能为空",
						trigger: "blur"
					}],
					'projectInfo.leaderTelephone': [{
							required: true,
							message: "负责人电话不能为空",
							trigger: "blur"
						},
						{
							required: true,
							validator: (rule, value, callback) => {
								if (value === '') {
									callback(new Error('请输入'));
								} else {
									let regPone = null;
									let mobile = /^1(3|4|5|6|7|8|9)\d{9}$/; //最新16手机正则
									let tel = /^(0[0-9]{2,3}\-)([2-9][0-9]{4,7})+(\-[0-9]{1,4})?$/; //座机
									if (value.charAt(0) == 0) { // charAt查找第一个字符方法，用来判断输入的是座机还是手机号
										regPone = tel;
									} else {
										regPone = mobile;
									}
									if (!regPone.test(value)) {
										return callback(
											new Error("请输入正确的电话号码")
										);
									}
									callback();
								}
							},
							trigger: "blur"
						}
					],
					'projectInfo.contactPersonName': [{
						required: true,
						message: "联系人姓名不能为空",
						trigger: "blur"
					}],
					'projectInfo.contactPersonTelephone': [{
							required: true,
							message: "联系人电话不能为空",
							trigger: "blur"
						},
						{
							required: true,
							validator: (rule, value, callback) => {
								if (value === '') {
									callback(new Error('请输入'));
								} else {
									let regPone = null;
									let mobile = /^1(3|4|5|6|7|8|9)\d{9}$/; //最新16手机正则
									let tel = /^(0[0-9]{2,3}\-)([2-9][0-9]{4,7})+(\-[0-9]{1,4})?$/; //座机
									if (value.charAt(0) == 0) { // charAt查找第一个字符方法，用来判断输入的是座机还是手机号
										regPone = tel;
									} else {
										regPone = mobile;
									}
									if (!regPone.test(value)) {
										return callback(
											new Error("请输入正确的电话号码")
										);
									}
									callback();
								}
							},
							trigger: "blur"
						}
					],
					'projectApprove.plannedStartDate': [{
						required: true,
						message: "计划开工日期不能为空",
						trigger: "change"
					}],
					'projectApprove.projectProvince': [{
						type: 'number',
						required: true,
						message: "省市重大项目不能为空",
						trigger: "change"
					}],
					'projectApprove.actualStartDate': [{
						required: true,
						message: "实际开工日期不能为空",
						trigger: "change"
					}],
					'projectBuild.listedStatistics': [{
						type: 'number',
						required: true,
						message: "列统情况不能为空",
						trigger: "blur"
					}],
					'projectBuild.accumulatedCompleted': [{
						required: true,
						message: "累计完成投资不能为空",
						trigger: "blur"
					}],
					'projectBuild.currentYearCompleted': [{
						required: true,
						message: "当年完成投资不能为空",
						trigger: "blur"
					}]
				},
				projectId: null,
				statusList: [],
				hppslxList: [],
				appslxList: [],
				nppslxList: [],
				parentId: null
			};
		},
		async onLoad(option) {
			if (option.projectId) {
				uni.setNavigationBarTitle({
					title: '修改项目'
				});
				this.projectId = option.projectId
			}
			if (option.parentId) {
				uni.setNavigationBarTitle({
					title: '新增项目分期'
				});
				this.parentId = this.projectId = option.parentId
			}
			if(option.projectId||option.parentId){
				await getProjectInfo(this.projectId).then(res => {
					this.form = res.data
					if (!this.form.projectApprove) {
						this.form.projectApprove = {}
					}
					if (!this.form.projectBuild) {
						this.form.projectBuild = {}
					}
					if (this.parentId) {
						this.form.projectInfo.entryStatus = null
					}
				})
			}			
			this.init()
			this.roles = uni.getStorageSync("roleinfo")
		},
		methods: {
			init() {
				//投资方式
				getDicts('tzfs').then(res => {
					this.dictList[0].list = res.data
					if (this.projectId) {
						this.form.projectInfo.investmentModeName = res.data.filter(item => item.dictValue != this
							.form.projectInfo.investmentMode)[0].dictLabel
						this.$forceUpdate()
					}
				})
				//外资币种
				getDicts('wzjhlx').then(res => {
					this.dictList[1].list = res.data
					if (this.projectId) {
						this.form.projectInfo.foreignInvestmentTypeName = res.data.filter(item => item.dictValue !=
							this
							.form.projectInfo.foreignInvestmentType)[0].dictLabel
						this.$forceUpdate()
					}
				})
				//产业类别
				getDicts('cylb').then(res => {
					this.dictList[2].list = res.data
				})
				//产业链
				getDicts('cyl').then(res => {
					this.dictList[3].list = res.data
					if (this.projectId) {
						this.form.projectInfo.industrialChainName = res.data.filter(item => item.dictValue != this
							.form.projectInfo.industrialChain)[0].dictLabel
						this.$forceUpdate()
					}
				})
				//五评状态
				getDicts('wpblzt').then(response => {
					response.data.map(item => {
						item.text = item.dictLabel
						item.value = parseInt(item.dictValue)
					})
					this.statusList = response.data;
				})
				//环评类型
				getDicts('hppslx').then(response => {
					response.data.map(item => {
						item.text = item.dictLabel
						item.value = parseInt(item.dictValue)
					})
					this.hppslxList = response.data;
				})
				//安评类型
				getDicts('appslx').then(response => {
					response.data.map(item => {
						item.text = item.dictLabel
						item.value = parseInt(item.dictValue)
					})
					this.appslxList = response.data;
				})
				//能评类型
				getDicts('nppslx').then(response => {
					response.data.map(item => {
						item.text = item.dictLabel
						item.value = parseInt(item.dictValue)
					})
					this.nppslxList = response.data;
				})
				//获取一级行业
				listMultiDict('1783481533278810114').then(res => {
					this.siftList[0].list = res.data
				})
				if (this.roles.includes('company')) {
					getCompanyDetail().then(res => {
						this.form.projectInfo.projectOwner = res.data.companyName
						this.form.projectInfo.socialCreditCode = res.data.unifySocialCreditCode
					})
				}
			},
			//打开行业选择
			openArea(index) {
				this.areaType = index
				this.areaColumns = []
				this.areaColumns.push(this.siftList[index].list)
				var curIndex = this.siftList[index].list.findIndex((value) => value.dictName == this.form.projectInfo[this
					.siftList[this.areaType].name + 'Name'])
				this.defaultValue[0] = curIndex == -1 ? 0 : curIndex
				this.areaPicker = true
			},
			//选择行业
			confirmAreaPicker(e) {
				if (this.areaType == 0) {
					listMultiDict(e.value[0].baseId).then(res => {
						this.siftList[1].list = res.data
					})
					this.form.projectInfo.industryTypeTwo = ""
					this.form.projectInfo.industryTypeTwoName = ""
				}
				this.form.projectInfo[this.siftList[this.areaType].name] = e.value[0].baseId
				this.form.projectInfo[this.siftList[this.areaType].name + 'Name'] = e.value[0].dictName
				this.areaPicker = false
			},
			//打开选择字典
			openPicker(index) {
				this.pickerType = index
				this.columns = []
				this.columns.push(this.dictList[index].list)
				var curIndex = this.dictList[index].list.findIndex((value) => value.dictLabel == this.form.projectInfo[this
					.dictList[index].label + 'Name'])
				this.defaultIndex[0] = curIndex == -1 ? 0 : curIndex
				this.showPicker = true
			},
			//选择字典
			confirmPicker(e) {
				this.form.projectInfo[this.dictList[this.pickerType].label] = e.value[0].dictValue
				this.form.projectInfo[this.dictList[this.pickerType].label + 'Name'] = e.value[0].dictLabel
				this.showPicker = false
			},
			//打开选择时间
			openDate(index) {
				this.dateType = index
				this.$refs.myPicker.show();
			},
			//选择时间
			handleSubmit(e) {
				if (this.dateType == 0) {
					this.form.projectInfo[this.dateList[this.dateType].label] = `${e.year}-${e.month}-${e.day}`
				} else {
					this.form.projectApprove[this.dateList[this.dateType].label] = `${e.year}-${e.month}-${e.day}`
				}
			},
			//选择上传
			selectFile(e, name) {
				uni.uploadFile({
					url: getApp().globalData.fileUrl, //仅为示例，非真实的接口地址
					filePath: e.tempFilePaths[0],
					name: 'file',
					header: {
						"Authorization": uni.getStorageSync('access_token'),
						"clientid": "e5cd7e4891bf95d1d19206ce24a7b32e"
					},
					success: (uploadFileRes) => {
						this.form.projectApprove[name + 'Arr'].push({
							name: JSON.parse(uploadFileRes.data).data.fileName,
							url: JSON.parse(uploadFileRes.data).data.url,
							ossId: JSON.parse(uploadFileRes.data).data.ossId
						})
						this.form.projectApprove[name] = this.form.projectApprove[name + 'Arr'].map((elem,
							index) => {
							return elem.ossId;
						}).join(",")
					},
					fail: (res) => {
						uni.showToast({
							title: res,
							icon: 'none'
						})
					}
				});
			},
			//删除上传
			deleteFile(e, name) {
				this.form.projectApprove[name + 'Arr'].splice(this.form.projectApprove[name + 'Arr'].findIndex(item => item
					.url == e.tempFilePath), 1);
				this.form.projectApprove[name] = this.form.projectApprove[name + 'Arr'].map((elem,
					index) => {
					return elem.ossId;
				}).join(",")
			},
			//选择位置
			getMapLocation() {
				uni.navigateTo({
							url: '/pages_two/mine/company/auditList?isAudit=1'
						})
				// uni.chooseLocation({
				// 	success: (res) => {
				// 		this.form.projectInfo.landLocationFirst = res.address
				// 		this.form.projectInfo.longitude = res.longitude
				// 		this.form.projectInfo.latitude = res.latitude
				// 	},
				// 	fail: () => {
				// 		// 如果用uni.chooseLocation没有获取到地理位置，则需要获取当前的授权信息，判断是否有地理授权信息
				// 		uni.getSetting({
				// 			success: (res) => {
				// 				console.log(res);
				// 				var status = res.authSetting;
				// 				if (!status['scope.userLocation']) {
				// 					// 如果授权信息中没有地理位置的授权，则需要弹窗提示用户需要授权地理信息
				// 					uni.showModal({
				// 						title: "是否授权当前位置",
				// 						content: "需要获取您的地理位置，请确认授权，否则地图功能将无法使用",
				// 						success: (tip) => {
				// 							if (tip.confirm) {
				// 								// 如果用户同意授权地理信息，则打开授权设置页面，判断用户的操作
				// 								uni.openSetting({
				// 									success: (data) => {
				// 										// 如果用户授权了地理信息在，则提示授权成功
				// 										if (data
				// 											.authSetting[
				// 												'scope.userLocation'
				// 											] === true
				// 										) {
				// 											uni.showToast({
				// 												title: "授权成功",
				// 												icon: "success",
				// 												duration: 1000
				// 											})
				// 											// 授权成功后，然后再次chooseLocation获取信息
				// 											uni.chooseLocation({
				// 												success: (
				// 													res
				// 												) => {
				// 													this.form
				// 														.projectInfo
				// 														.landLocationFirst =
				// 														res
				// 														.address
				// 													this.form
				// 														.projectInfo
				// 														.longitude =
				// 														res
				// 														.longitude
				// 													this.form
				// 														.projectInfo
				// 														.latitude =
				// 														res
				// 														.latitude
				// 												}
				// 											})
				// 										} else {
				// 											uni.showToast({
				// 												title: "授权失败",
				// 												icon: "none",
				// 												duration: 1000
				// 											})
				// 										}
				// 									}
				// 								})
				// 							}
				// 						}
				// 					})
				// 				}
				// 			},
				// 			fail: (res) => {
				// 				uni.showToast({
				// 					title: "调用授权窗口失败",
				// 					icon: "none",
				// 					duration: 1000
				// 				})
				// 			}
				// 		})
				// 	}
				// });
			},
			submit() {
				console.log('this.form: ', this.form);
				this.$refs.uForm.validate().then(res => {
					uni.showLoading({
						title: '提交中'
					});
					var obj = {}
					if (this.form.projectInfo.entryStatus == 1) {
						obj = {
							projectInfo: this.form.projectInfo
						}
					} else if (this.form.projectInfo.entryStatus == 2) {
						obj = {
							projectInfo: this.form.projectInfo,
							projectApprove: this.form.projectApprove
						}
					} else if (this.form.projectInfo.entryStatus == 3) {
						obj = {
							projectInfo: this.form.projectInfo,
							projectApprove: this.form.projectApprove,
							projectBuild: this.form.projectBuild
						}
					} else {
						obj = this.form
					}
					if (this.parentId) {
						obj.projectInfo.parentId = this.parentId
						addProjectStages(obj).then(res => {
							if (res.code == 200) {
								uni.hideLoading()
								uni.showToast({
									title: '提交成功！',
									icon: 'success',
									duration: 2000
								})
								setTimeout(() => {
									uni.navigateBack()
								}, 2000)
							} else {
								uni.showToast({
									title: res.msg,
									icon: 'none',
									duration: 2000
								})
							}
						})
					} else {
						if (this.projectId) {
							updateProjectInfo(obj).then(res => {
								if (res.code == 200) {
									uni.hideLoading()
									uni.showToast({
										title: '提交成功！',
										icon: 'success',
										duration: 2000
									})
									setTimeout(() => {
										uni.navigateBack()
									}, 2000)
								} else {
									uni.showToast({
										title: res.msg,
										icon: 'none',
										duration: 2000
									})
								}
							})
						} else {
							addProjectInfo(obj).then(res => {
								if (res.code == 200) {
									uni.hideLoading()
									uni.showToast({
										title: '提交成功！',
										icon: 'success',
										duration: 2000
									})
									setTimeout(() => {
										uni.navigateBack()
									}, 2000)
								} else {
									uni.showToast({
										title: res.msg,
										icon: 'none',
										duration: 2000
									})
								}
							})
						}
					}
				}).catch(errors => {
					console.log('errors: ', errors);
					uni.$u.toast('请完善必填项！')
				})
			}
		},
		onReady() {
			//如果需要兼容微信小程序，并且校验规则中含有方法等，只能通过setRules方法设置规则。
			this.$refs.uForm.setRules(this.rules)
		}
	}
</script>

<style lang="scss" scoped>
	.form-area {
		background-color: #fff;
		margin-top: 30rpx;
		padding: 10rpx 30rpx 30rpx 30rpx;
	}
</style>